import { action, observable } from 'mobx'
class Store {
    // mask 遮罩
    @observable showMask = true
    // Popup 弹层
    @observable showPopup = false

    @action
    onMaskClick = () => {
        this.showMask = false
    }
    @action
    shareMedal = e => {
        this.showPopup = true
    }

    @action
    onShowPopup = () => {
        this.showPopup = false
    }

    /**
     * 调起钉钉分享方法
     * @param {activityPoster | gatherPoster} type 类型 活动勋章 | 集齐勋章
     * @param {kankan | save} event 事件 分享到看看 | 保存相册
     * @param {object} medal 勋章信息
     */
    postDingShare(type, event, medal) {
        this.onMaskClick()
        this.onShowPopup()
    }
}
export default Store
